using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public delegate void UIMessageAction(UIFrameMessageStruct message);

public class UIFrameMessageStruct
{
    public string uiMessageID;
    public string uiMessageJson;
    public object uiMessageObj;
    public T ReadToJson<T>()
    {
        T date = JsonUtility.FromJson<T>(uiMessageJson);
        return date;
    }

    public T ReadToObject<T>() where T :class,new ()
    {
        return uiMessageObj as T;
    }
}
